﻿using Module.NumberGame.Common;
using Prism.Commands;
using Prism.Events;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace Module.NumberGame.ViewModels
{
    public class NumberBoxViewModel : BindableBase
    {
        private readonly IEventAggregator Ea;

        public NumberBoxViewModel(IEventAggregator ea)
        {
            this.Ea = ea;
            Ea.GetEvent<NumberBoardDataEvent>().Subscribe(BoardDataChanged);
            Ea.GetEvent<NumberMessageEvent>().Subscribe(PieceMove);
            //PieceValue = 1;
        }

        private void PieceMove(NumberMessage obj)
        {
            
        }

        private void BoardDataChanged(NumberMessage obj)
        {
            //PieceValue = obj.BoardDataMessage[0,0]; 
            //PieceValue = (PieceValue == 0) ? 2 : 0;
        }
    }
}
